// 加载自定义模块 db.js 
const db = require('./db');

db('select id, username from student', (err, result) => {
  if (err) throw err;
  console.log(result);
});